import { Accounts } from "./AccountManager";

export async function claim(accounts: Accounts, amount: number): Promise<number> {
    const claimId = await accounts.destination.provider.createClaim(accounts.destination.pk, accounts.source.otherChainAddress);
    await accounts.source.provider.commit(accounts.source.pk, claimId, amount, accounts.destination.otherChainAddress);
    return claimId;
}
